﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SDL;

namespace BusinessLogic
{
    public static class UserExtensions
    {
        public static UserInfo getByLoginPassword(string login, string password)
        {
            var n = new UserInfo();
            n["login"] = login;
            n["password"] = password;
            n.Run("user.getByLoginPassword");
            return n.getOne<UserInfo>();
        }

        public static List<UserInfo> getAll()
        {
            var n = new UserInfo();
            n.Run("user.getAll");
            return new List<UserInfo>(n.getList<UserInfo>());
        }
    }
}
